<?php  echo $this->Session->flash();?>

<div class="row">
	<div class="col-lg-12">
		<h1 class="page-header">Add new Static</h2>
	</div>
</div>
<?php echo $this->Form->create('Static');?>
<table class="table table-striped table-bordered table-hover" id="dataTables-example">
	<tr>
		<td align="right" nowrap="nowrap" class="textBold">Parent category</td>
		<td>
			<div class="category_type">
				<select name="data[Static][category_id]" id="cat_parent_id" class="form-control">
					<option value="0">--[upper_category]--</option>
					<?php
					foreach($listCategory as $cat):
					?>
						<option value="<?php echo $cat["id"]?>" >
						<?php
						for($j=0; $j < $cat["level"]; $j++) echo "---";
							echo $cat["cat_name"];
						?>
						</option>
					<?php
					endforeach;
					?>
				</select>
			</div>
		</td>
	</tr>

	<tr>
		<td align="right" nowrap class="textBold">Tên trang tinh</td>
		<td>
			<?php
			echo $this->Form->input('sta_name', array(
					'type' => 'text',
					'label' => false,
					'class' => 'form-control w400',
					'required' => true,
					'id'=>'sta_name',
					'value'=>'',
					'placeholder' =>('Tên')
			));
			?>
		</td>
	</tr>

	<tr>
		<td align="right" nowrap class="textBold">Title SEO</td>
		<td>
			<?php
			echo $this->Form->input('title_seo', array(
					'type' => 'text',
					'label' => false,
					'class' => 'form-control w400',
					'required' => false,
					'id'=>'title_seo',
					'value'=>'',
			));
			?>
		</td>
	</tr>
	<tr>
		<td align="right" nowrap class="textBold">Keyword SEO</td>
		<td>
			<?php
				echo $this->Form->textarea('keyword_seo', array(
					'label' => false,
					'required' => false,
					'rows'=> 4,
					'cols' => 70,
					'value'=>'',
				));
			?>
		</td>
	</tr>
	<tr>
		<td nowrap="nowrap" align="right" class="textBold">Description SEO</td>
		<td>
			<?php
				echo $this->Form->textarea('description_seo', array(
					'label' => false,
					'required' => false,
					'rows'=>4,
					'cols' => 70,
					'value'=>'',
				));
			?>
		</td>
	</tr>
	<tr>
		<td nowrap="nowrap" align="right" class="textBold">Contents</td>
		<td>
			<?php
				echo $this->Form->textarea('sta_content', array(
					'label' => false,
					'class' => 'ckeditor',
					'required' => false,
					'rows'=>4,
					'value'=>'',
				));
			?>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>
			<div class="form-group">
			<?php
			echo $this->Form->hidden('active', array('value' => 1));
			echo $this->Form->input('create_time', array(
					'type' => 'hidden',
					'value'=>time(),
			));
			echo $this->Form->input('last_update', array(
					'type' => 'hidden',
					'value'=>time(),
			));
			echo $this->Form->button('Submit', array(
					'type' => 'submit',
					'class' => 'btn btn-primary',
					'label' => false,
					'div' => false,
				)
			).'  ';

			echo $this->Form->button('Reset', array(
					'type' => 'reset',
					'class' => 'btn btn-primary',
					'label' => false,
					'div' => false,
				)
			);
			?>
			</div>
		</td>
	</tr>
</table>
<?php echo $this->Form->end()?>